import request from '@/untils/request'

// 查询库区
export const getKqList = (params) => request.get('/api/area/pageDetail', { params })
// 添加库区
export const addKq = (data) => request.post('/api/area', data)
// 所属仓库
export const myKq = (params) => request.get('/api/warehouse/list', { params })
// 查询id
export const searchId = (id) => request.get(`/api/area/${id}`)
// 编辑
export const editKq = (data) => request.put('/api/area', data)
// 删除库区
export const delKq = (id) => request.delete('/api/area?ids[]=' + id)
// 导出文件
// export const excle = () => request.get('/template/areaTemplate.xlsx')
export const excle = () => request({
  url: '/template/areaTemplate.xlsx',
  responseType: 'blob'
})
// 导入文件
export const importExcel = (formFile) => request({
  method: 'post',
  url: '/api/area/importExcel',
  data: formFile
})
